home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazin 1997 March / Image.iso / wd.dxr / Postit_10_Postit Main.ls < prev    next >
Encoding:
Text File  |  1996-10-28  |  2.6 KB  |  73 lines

  1. global gPostitSprite, gPostitMode, gPostitActive
  2.  
  3. on PostitPrepare
  4.   postitActive()
  5.   RememberSpriteCursors()
  6.   SpriteCursor("all", 0)
  7.   DeactivateSpritesExcept([gPostitSprite + 2, gPostitSprite + 3])
  8.   if the castNum of sprite 44 <> the number of member "PostIt" then
  9.     set the puppet of sprite 44 to 1
  10.     set the castNum of sprite 44 to the number of member "PostIt"
  11.     set the locH of sprite 44 to 180
  12.     set the locV of sprite 44 to 240
  13.     set the width of sprite 44 to the width of cast "PostIt"
  14.     set the height of sprite 44 to the height of cast "PostIt"
  15.     set the ink of sprite 44 to 36
  16.   end if
  17.   if the castNum of sprite 45 <> the number of member "PostIt Unten" then
  18.     set the puppet of sprite 45 to 1
  19.     set the castNum of sprite 45 to the number of member "PostIt Unten"
  20.     set the locH of sprite 45 to 185
  21.     set the locV of sprite 45 to 302
  22.     set the width of sprite 45 to the width of cast "PostIt Unten"
  23.     set the height of sprite 45 to the height of cast "PostIt Unten"
  24.     set the ink of sprite 45 to 36
  25.   end if
  26.   if the castNum of sprite 48 <> the number of member "PostIt Beenden" then
  27.     set the puppet of sprite 48 to 1
  28.     set the castNum of sprite 48 to the number of member "PostIt Beenden"
  29.     set the locH of sprite 48 to 175
  30.     set the locV of sprite 48 to 234
  31.     set the width of sprite 48 to the width of cast "PostIt Beenden"
  32.     set the height of sprite 48 to the height of cast "PostIt Beenden"
  33.     set the ink of sprite 48 to 36
  34.   end if
  35.   repeat with i = gPostitSprite to gPostitSprite + 4
  36.     set the puppet of sprite i to 1
  37.     set the visible of sprite i to 1
  38.   end repeat
  39.   SpriteCursor([gPostitSprite + 2, gPostitSprite + 3], ["CursorFinger", "CursorFingerMask"])
  40.   set gPostitActive to 1
  41. end
  42.  
  43. on PostitEnde
  44.   set gPostitMode to #Ende
  45.   repeat with i in [44, 45, 48]
  46.     set the visible of sprite i to 0
  47.   end repeat
  48.   updateStage()
  49.   PostitPrepare()
  50.   set the castNum of sprite (gPostitSprite + 2) to the number of member "Postit Nein"
  51.   set the castNum of sprite (gPostitSprite + 3) to the number of member "Postit Ja"
  52.   set the castNum of sprite (gPostitSprite + 4) to the number of member "Postit Beenden"
  53.   updateStage()
  54.   playsound(1, "pgmende", 1)
  55.   pause()
  56. end
  57.  
  58. on PostitDelete
  59.   set gPostitMode to #delete
  60.   PostitPrepare()
  61.   set the castNum of sprite (gPostitSprite + 2) to the number of member "Postit Nein"
  62.   set the castNum of sprite (gPostitSprite + 3) to the number of member "Postit Ja"
  63.   set the castNum of sprite (gPostitSprite + 4) to the number of member "Postit Sp l├╢schen"
  64.   updateStage()
  65.   pause()
  66. end
  67.  
  68. on postitActive
  69.   if gPostitActive = 1 then
  70.     abort()
  71.   end if
  72. end
  73.